1. Field of the Invention
The present invention relates to a capacitance measuring apparatus, a method, and a program, more specifically to a capacitance measuring apparatus, a method, and a program which can determine whether a human body is touching or not highly accurately at high speed.
2. Description of the Related Art
A touch sensor that detects whether a human body is touching or not based on the variation in the capacitance of electrodes generally becomes widespread.
The touch sensor detects the capacitance of an electrode part to be a touch portion, determines whether the detected capacitance is the capacitance held by a human body, and thus detects the state that a human body is touching or not. The touch sensor is adapted to operation buttons of elevators and a launcher for balls of pachinko machines, for example.
FIG. 1 depicts the circuit configuration of a capacitance measuring apparatus of a switched capacitor mode for use in a traditional touch sensor.
Power supply Vcc is connected to one end part of condenser C1 through switch SW1. When the switch SW1 is turned on (turned to a connected state), the condenser C1 is charged at the charging voltage Vcc supplied from the power supply Vcc. The other end part of the condenser C1 is grounded. In FIG. 1, the charging voltage of the condenser C1 is set to voltage V1.
Switch SW2 is disposed between one end part of the condenser C1 and one end part of condenser C2. When it is turned on (turned to a connected state), the electric charge charged in the condenser C1 is charged as electric charge corresponding to the combined capacitance of the condenser C1 with the condenser C2. In addition, basically, the switches SW1 and SW2 are not turned on at the same time because of the function.
In the circuit shown in FIG. 1, capacitance is unknown in the condenser C1, whereas capacitance is known in the condenser C2. The circuit shown in FIG. 1 is used to measure the capacitance of the condenser C1, it is determined whether a human body has touched or not, and thus it functions as a touch sensor. More specifically, the condenser C1 is formed in a so-called capacitor (condenser) which accumulates electric charge in the circuit, but it is actually configured as an electrode that a human body can touch. Therefore, when the electrode is touched by a human body, the human body itself is the condenser C1 (it is a capacitor having the capacitance held by the human body).
Next, a capacitance detection process will be described with reference to FIGS. 2 and 3. As shown in FIG. 2, in a process at a first step, the switch SW1 is turned on, the switch SW2 is turned off, and then charging the condenser C1 is started. More specifically, at Time t0 shown in FIG. 3, the switch SW1 is turned on, the switch SW2 is turned off, and then the charging voltage Vcc is applied to the condenser C1.
Furthermore, in FIG. 3, a fine line in the upper part in the drawing depicts the charging voltage V1 of the condenser C1, and a thick line depicts the charging voltage V2 of the condenser C2. Moreover, the operation states of the switches SW1 and SW2 being on or off is depicted in the lower part in FIG. 3. The switches SW1 and SW2 are off when they are high level, whereas they are on when they are low level.
In a process at a second step, as shown in Time t1 in FIG. 3, both of the switches SW1 and SW2 are turned off, and then the condenser C1 is held in the state it is charged at the charging voltage V1 (=the power supply voltage Vcc of the power supply Vcc). In addition, since the condenser C2 is not charged with electric charge at this time, the charging voltage V2=0.
In a process at a third step, as shown in Time t2 in FIG. 3, the switch SW1 remains off, the switch SW2 is turned to the ON state, and thus the electric charge charged in the condenser C1 is transferred to the condenser C2.
In a process at a fourth step, as shown in Time t3 in FIG. 3, both of the switches SW1 and SW2 are turned off, and then the condensers C1 and C2 is held in the state that electric charge is charged at the charging voltages V1 and V2, respectively.
Here, since the charging voltages V1 and V2 of the condensers C1 and C2 are equally held, electric charge is accumulated in accordance with the capacity ratios of the condensers C1 and C2. More specifically, electric charges Q1 and Q2 charged in the condensers C1 and C2 are expressed by the following equations (1) and (2).Q1=C1×V1=C1×Vcc×(C1/(C1+C2))(at T1)  (1)Q2=C2×V2=C1×Vcc×(C2/(C1+C2))(at T1)  (2)
Accordingly, the charging voltage V2 of the condenser C2 is expressed by the following Equation (3).V2=Vcc×(C1/(C1+C2)(at T1)  (3)
Where cycle T1 is the repeated processing number when the processes at the first to fourth steps are repeated, and it is cycle TL when the repeated processing number is L times. In FIG. 3, the cycle T1 is the period from Time t2 to Time t6.
Furthermore, after the process at the fourth step is finished, the process returns to the process at the first step and the processes after that are repeated.
More specifically, the processes at the first to fourth steps are repeated, and then, for example, in the second time process, the switch SW1 is turned on, and the switch SW2 is turned off in the process at the first step. The charge of electric charge is started to the condenser C1, the switch SW1 is turned on, and the switch SW2 is turned off at Time t4 shown in FIG. 3. Thus, the charging voltage Vcc is applied to the condenser C1.
In the process at the second step, as shown in Time t5 in FIG. 3, both of the switches SW1 and SW2 are turned off, and thus the condenser C1 is held in the state that electric charge is charged at the charging voltage V1 (=the power supply voltage Vcc of the power supply Vcc). In addition, at this time, the condenser C2 remains in the state that electric charge is charged at the charging voltage expressed by the Equation (3) described above.
In the process at the third step, as shown in Time t6 in FIG. 3, the switch SW1 remains off and the switch SW2 is turned to the ON state. Thus, the electric charge charged in the condenser C1 is transferred to the condenser C2.
In the process at the fourth step, as shown in Time t7 in FIG. 3, both of the switches SW1 and SW2 are turned off, the condensers C1 and C2 are held in the state that electric charge is charged at the charging voltages V1 and V2, respectively.
Since the charging voltages V1 and V2 of the condensers C1 and C2 are also equally held here, electric charge is accumulated in accordance with the capacity ratios of the condensers C1 and C2. More specifically, the electric charges Q1 and Q2 charged in the condensers C1 and C2 are expressed by the following equations (4) and (5).
                                                        Q1              =                            ⁢                              C1                ×                V1                                                                                        =                            ⁢                              (                                                      (                                                                  (                                                  C1                          ×                          Vcc                                                )                                            +                                              (                                                  C1                          ×                          Vcc                          ×                                                      C2                            /                                                          (                                                              C1                                +                                C2                                                            )                                                                                                      )                                                              )                                    ×                                                                                                                      ⁢                              C1                /                                  (                                      C1                    +                    C2                                    )                                            )                                                                                                            =                                    ⁢                                      Vcc                    ×                                          C1                      ⁡                                              (                                                  1                          +                                                      C2                            /                            C1                                                    +                          C2                                                )                                                                                            )                            ×                              (                                  C1                  /                                      (                                          C1                      +                      C2                                        )                                                  )                            ⁢                                                          ⁢                              (                                  at                  ⁢                                                                          ⁢                  T2                                )                                                                                        =                            ⁢                              Vcc                ×                                  C1                  ⁡                                      (                                                                  (                                                                              C1                            2                                                    +                                                      2                            ×                            C1                            ×                            C2                                                                          )                                            /                                                                        (                                                      C1                            +                            C2                                                    )                                                2                                                              )                                                  ⁢                                                                  ⁢                                  (                                      at                    ⁢                                                                                  ⁢                    T2                                    )                                                                                        (        4        )                                                                    Q2              =                            ⁢                              C2                ×                V2                                                                                        =                            ⁢                              (                                                      (                                                                  (                                                  C1                          ×                          Vcc                                                )                                            +                                              (                                                  C1                          ×                          Vcc                          ×                                                      C2                            /                                                          (                                                              C1                                +                                C2                                                            )                                                                                                      )                                                              )                                    ×                                                                                                                      ⁢                              C2                /                                  (                                      C1                    +                    C2                                    )                                            )                                                                          =                            ⁢                              Vcc                ×                                  C1                  ⁡                                      (                                          1                      +                                              C2                        /                                                  (                                                      C1                            +                            C2                                                    )                                                                                      )                                                  ×                                  (                                      C2                    /                                          (                                              C1                        +                        C2                                            )                                                        )                                ⁢                                                                  ⁢                                  (                                      at                    ⁢                                                                                  ⁢                    T2                                    )                                                                                                        =                            ⁢                              Vcc                ×                                  C2                  ⁡                                      (                                                                  (                                                                              C1                            2                                                    +                                                      2                            ×                            C1                            ×                            C2                                                                          )                                            /                                                                        (                                                      C1                            +                            C2                                                    )                                                2                                                              )                                                  ⁢                                                                  ⁢                                  (                                      at                    ⁢                                                                                  ⁢                    T2                                    )                                                                                        (        5        )            
Therefore, the charging voltage V2 of the condenser C2 is expressed by the following Equation (6).V2=Vcc×C2((C12+2×C1×C2)/(C1+C2)2)(at T2)  (6)
As described above, the processes at the first to fourth steps are repeated to rerun the same processes as the processes that have been run in the cycle T1 from Time t2 to Time t6, and proceed to the cycles T2, T3 and so on. Moreover, as the cycle advances, the voltage of C2/(C1+C2) in the differential voltage of the charging voltage between the condensers C2 and C1 is sequentially added to the charging voltage V2 of the condenser C2. More specifically, as shown in FIG. 3, the charging voltage V2 of the condenser C2 is V2a=Vcc×C2/(C1+C2) in the cycle T1, V2b=Vcc×C2/(C1+C2)+(Vcc−Vcc×C2/(C1+C2))×C2/(C1+C2) in the cycle T2, V2c=Vcc×C2/(C1+C2)+(Vcc−Vcc×C2/(C1+C2))×C2/(C1+C2)+(Vcc−(Vcc×C2/(C1+C2)+(Vcc−Vcc×C2/(C1+C2))×C2/(C1+C2))×C2/(C1+C2) in the cycle T3. Here, as shown in FIG. 3, for the relationship with the charging voltage V1 of the condenser C1, the relationship of V2a+V1a=V2b+V1b=V2c+V1c is satisfied.
Consequently, in the case of the cycle TN (the repeated processing number in the processes at the first to fourth steps is done for N times), the charging voltage V2 of the condenser C2 is expressed by the following Equation (7).V2=Vcc×(1−(C2/(C1+C2))N)  (7)
As shown in Equation (7), the charging voltage V2 of the condenser C2 is increased in accordance with the processing number N. Furthermore, in Equation (7), since the capacitance of the condenser C1 is known, the capacitance of the condenser C2 is to be determined based on the processing number N until the charging voltage V2 reaches the reference voltage Vref.
For example, it is applied to the circuit configuration of a touch sensor in which a human body does not directly touch an electrode and human body's touch (closeness) is detected through an insulator. Then, as shown in FIG. 4, suppose the parasitic capacitance of the condenser C1 (the capacitance when a human body does not touch) is 10 pF when the reference voltage Vref is Vref=Vcc/2 and the capacitance of the condenser C2 is 16000 pF. The charging voltage V2 reaches the reference voltage Vref when the processing number N is 1000 times. On the other hand, suppose the capacitance of the condenser C1 is 11 pF (the capacitance that is increased by human body's touch (closeness) is 1 pF with respect to the capacitance when a human body does not touch the condenser C1). The charging voltage V2 reaches the reference voltage when the processing number N is 1100 times. Where a time interval between Time ti and Time t(i+1) is 2 μS, and thus, the processing cycle Ti−T (i+1) is 8 μS.
More specifically, the capacitance of the condenser C1 is determined from the processing number N when the charging voltage V2 of the condenser C2 reaches the reference voltage Vref.
In addition, in the case of FIG. 4, the processing number N has a difference of 100 times between at times when a human body touches and when it does not touch. Suppose the difference is regarded as resolving power, the resolving power for a human body touching or not can be considered as: the repeated processing number N=100. As the resolving power is greater, that is, the difference of the processing number between the state that a human body touches and the state that it does not touch is greater, it can be said that whether a human body is touching or not can be determined more highly accurately.
Based on the principle like this, the touch sensor of the switched capacitor mode determines whether a human body is touching or not (for example, Patent Documents 1 and 2).
Patent Document 1: JP-T-2002-530680
The term “JP-T” as used herein means a published Japanese translation of PCT patent application.
Patent Document 2: JP-A-7-318365